package com.eastfair.questionnaire.dto;

import com.eastfair.core.base.entity.Entity;
import com.eastfair.enums.SystemSourceEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 实体类
 * 答题结果
 * </p>
 *
 * @author yuwx
 * @since 2021-08-18
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = false)
@Builder
@ApiModel(value = "AnswerResultDTO", description = "答题结果")
public class AnswerSubjectResultSaveDTO extends Entity<Long> implements Serializable {

    private static final long serialVersionUID = 1L;
    public interface validateBase {}

    public interface validateGet{}

    public interface validateSave{}
    /**
     * 项目ID
     */
    @ApiModelProperty(value = "项目ID")
//    @NotNull(groups = {AnswerSubjectResultSaveDTO.validateSave.class}, message =  "项目ID")
    private Long projectId;

    /**
     * 实体类型
     */
    @ApiModelProperty(value = "实体类型")
    @Size(max = 32, message = "实体类型长度不能超过32")
    @NotNull(groups = {AnswerSubjectResultSaveDTO.validateSave.class}, message =  "实体类型")
    private String subjectType;
    /**
     * 实体id
     */
    @ApiModelProperty(value = "实体id")
    @NotNull(groups = {AnswerSubjectResultSaveDTO.validateSave.class}, message =  "实体id")
    private Long subjectId;

    /**
     * 数据来源系统
     */
    @ApiModelProperty(value = "数据来源系统")
    @Size(max = 64, message = "数据来源系统长度不能超过64")
    @NotNull(groups = {AnswerSubjectResultSaveDTO.validateSave.class}, message =  "数据来源系统")
    private String sourceSystem;
    /**
     * 答案结果
     */
    @ApiModelProperty(value = "答案结果")
    @Valid
    private List<AnswerResultDTO> answerResultList;
}
